package com.jihui.enterprise.service;

import com.jihui.enterprise.AbcEnterprise;
import com.jihui.enterprise.EnterpriseManager;
import com.jihui.enterprise.domain.model.EnterpriseRepository;
import org.jetbrains.annotations.Nullable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * ${DESCRIPTION}
 *
 * @author 王进
 * @since 2017-09-18 17:05
 **/
@RestController
@RequestMapping
public class UserManagerImpl implements EnterpriseManager {

    @Autowired
    private EnterpriseRepository enterpriseRepository;


    @Nullable
    @Override
    public AbcEnterprise findByUserId(@RequestParam("userId") String userId) {
        return enterpriseRepository.findByUserId(userId);
    }
}
